function delEmpty (object) {
    for (var i in object) {
      var value = object[i]
      if (typeof value === 'object') {
        if (Array.isArray(value)) {
          if (value.length === 0) {
            delete object[i]
            continue
          }
        }
        delEmpty(value)
        if (isEmpty(value)) {
          delete object[i]
        }
      } else {
        if (value === '' || value === null || value === undefined) {
          delete object[i]
        } else {
        }
      }
    }
}

function isEmpty (object) {
    for (var name in object) {
        return false
    }
    return true
}

export {
    delEmpty
}
